<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>通知</title>
</head>
<meta name="viewport"
	content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<style type="text/css">
	* {
		margin: 0;
		padding: 0;
	}

	.notice {
		display: none;
	}

	table,
	table tr th,
	table tr td {
		border: .05rem solid #ccc;
	}

	table {
		text-align: center;
		border-collapse: collapse;
		padding: .1rem;
	}

	img {
		max-width: 100%;
	}
	video{
		background-color: #000;
		max-width: 100%;
	}
	.title {
		margin: .875rem .7rem .5rem .7rem;
		text-align: center;
		font-size: .9rem;
		line-height: 1.2rem;
		/* height: 2.125rem; */

		/* overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap; */
		color: rgb(37, 37, 37);
		font-Family: "PingFang-SC-Medium",
	}

	.title-p {
		text-align: center;
		margin-bottom: .8rem;
	}

	.name-span {
		display: inline-block;
		font-size: .6rem;
		/* margin: 0 0 0 14rem; */
		padding-right: .3rem;
		color: rgb(152, 152, 152);
		border-right: .05rem solid rgb(195, 195, 195);
		line-height: 1;
	}

	.date-span {
		color: rgb(152, 152, 152);
		display: inline-block;
		margin-left: .1rem;
		font-size: .6rem;
	}

	/* i {
		display: inline-block;
		width: .8em;
		height: .8em;
		background-position: center;
		background-size: contain;
		margin-right: 3px;
	} */



	/* .border {
		display: inline-block;
		height: 1px;
		width: 96%;
		background: #ccc;
		margin: -1rem 0 0 2%;
	} */

	.content {
		margin: .7rem;
		font-size: .8rem;
		font-Family: "PingFang-SC-Regular";
		margin-top: 0;
		line-height: 1.2rem;
	}

	.empty {
		display: none;
		margin: auto;
		width: 100%;
		/* height: 40rem; */
		text-align: center;
		margin-top: 15rem;


	}
	
	.empty i {

		display: inline-block;
		background-image: url(./cp_notdata@3x.png);
		background-position: center;
		background-repeat: no-repeat;
		background-size: contain;
		width: 10rem;
		height: 3.4rem;
	}

	.empty p:nth-child(2) {
		font-size: 0.8rem;
	}

	.empty p:nth-child(3) {
		font-size: .6rem;
		line-height: 1.2rem;
		color: rgb(152, 152, 152)
	}
</style>

<body>
	<div class="empty"><i></i>
		<p>暂无数据</p>
	</div>
	<div class="notice">
		<p class="title">关于2017新生入学报到注意事项</p>
		<p class="title-p"><span class="name-span"> 张三</span> <span class="date-span">2019-12-11 23:15</span></p>
		<!-- <span class="border"></span> -->
		<div class="content">
			<p>
				<span style="color: rgb(51, 51, 51); font-family: 宋体; background-color: rgb(255, 255, 255);">&nbsp;
					<span
						style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-family: 楷体, 楷体_GB2312, SimKai; font-size: 18px;">为增强教职工身体素质，促进游泳爱好者的沟通与交流，由校工会主办、体育科协办“广东实验中学附属天河学校2017年教职工运动会”即将开赛，现将具体事项通知如下：</span></span><br /><span
					style="font-family: 楷体, 楷体_GB2312, SimKai; font-size: 18px;"><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">一、比赛时间</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; 2017年9月27日17:00（游泳比赛）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; 2017年10月20日（4*100米接力赛）</span><br /><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">二、比赛地点</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; 校游泳池（游泳比赛）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; 田径场（4*100米接力赛）</span><br /><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">三、比赛方法</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">1.比赛项目（游泳比赛）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;个人单项：（游泳比赛）50米蛙泳、50米自由泳</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;团体接力：（游泳比赛）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;6*20浮板打腿接力（3男3女）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;4*50自由接力（2男2女）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;短跑接力：4*100米接力赛</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;&nbsp;（团体游泳接力项目不可兼项。）</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">2.个人单项比赛每个项目参赛人数必须多于3人，否则不设项。</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">3.个人单项和团体项目报名相互不影响。</span><br /><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">四、奖项设置</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;
						设个人及团体一、二、三等奖，其余参与奖。</span><br /><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">五、报名时间</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;
						即日起至9月22日.</span><br /><strong><span
							style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">六、报名方式</span></strong><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp;
						凡身体健康的在编在岗教职工均可报名参加本次比赛。请有意参加比赛的老师在9月22日前在工会组长处报名。</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">欢迎大家踊跃报名。</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
						&nbsp; &nbsp; &nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
						&nbsp;校工会</span><br /><span
						style="font-family: 楷体, 楷体_GB2312, SimKai; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">&nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
						&nbsp; &nbsp; &nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
						&nbsp;2020年9月12日</span></span>
			</p>
		</div>
	</div>


</body>
<script src="jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	(function (doc, win) {
		var docEl = doc.documentElement,
			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
			recalc = function () {
				var clientWidth = docEl.clientWidth;
				if (!clientWidth) return;
				docEl.style.fontSize = 20 * (clientWidth / 375) + 'px'; //在320px的屏幕上，1rem=20px
			};
		if (!doc.addEventListener) return;
		win.addEventListener(resizeEvt, recalc, false);
		doc.addEventListener('DOMContentLoaded', recalc, false);
	})(document, window);

	function getQueryVariable(variable) {
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		for (var i = 0; i < vars.length; i++) {
			var pair = vars[i].split("=");
			if (pair[0] == variable) {
				return pair[1];
			}
		}
		return (false);
	}

	function ajaxN(url, submitType, param, successFunction) {

		// if (param.URL == summaryURL) {
		// 	param.Token = '73fd7fef550517630996697579bb8828';
		// 	param.SchoolID = 's14-129-8f41';
		// 	param.SubjectID = 'S1-English';
		// 	param.TeacherGH = 'bktea1';
		// }
		$.ajax({
			url: url,
			headers: {
				Authorization: "X-Token=" + getQueryVariable('Token'),
			},
			type: submitType,
			timeout: 60000,
			dataType: "json",
			data: param,

			success: function (data) {
				successFunction(data);
			},
			error: function (data) {
				// assistantTipsFn('请求错误~');
				// $('.assistant-popup-loading').hide();
				$('.notice').hide();
				$('.empty').show();
				// if ($('.assistant-active').attr('name') == 1) {
				// 	$('.infoCenter-empty').show();
				// 	$('.infoCenter-empty-text').text($('.info-active').eq(1).text());
				// }
				// if ($('.assistant-active').attr('name') == 1 && $('.info-active').eq(0).attr('name') == 2) {
				// 	assistantTipsFn('数据加载失败~');
				// }
				// if ($('.assistant-active').attr('name') == 2) {
				// 	$('.personal-schedule-box').hide();
				// 	$('.personal-schedule-empty').show();
				// }
			},
			complete: function (XMLHttpRequest, status) {
				if (status == 'timeout') {
					XMLHttpRequest.abort(); // 超时后中断请求
					$('.notice').hide();
					$('.empty').show();
					// $('.assistant-popup-loading').hide();
					// assistantRemindFn(['网络超时，请刷新'], function() {
					// 	ajaxN(url, submitType, param, successFunction);
					// })
				}
			}
		})
	};
	var sendData = {
		NoticeID: getQueryVariable('NoticeID'),
		UserID: getQueryVariable('UserID'),
	};
	var url = getQueryVariable('url');

	function audioAutoPlay(id) {
		var audio = document.getElementById(id);
		play = function () {
			audio.play();
			// document.removeEventListener("touchstart", play, false);
		};
		// audio.play();  
		// document.addEventListener("WeixinJSBridgeReady", function () {
		// 	play();
		// }, false);
		// document.addEventListener('YixinJSBridgeReady', function () {
		// 	play();
		// }, false);
		// document.addEventListener("touchstart", play, false);
	}

	ajaxN(url + '/Notice/ReceiveNotice/GetNoticeContent', 'get', sendData, function (data) {
		if (data.StatusCode == 200 && data.Data.BackCode == 1) {
			$('.name-span').html(data.Data.Item.NoticeMain.PublisherName);
			$('.date-span').html(data.Data.Item.NoticeMain.EffectTime.slice(0, 16));
			$('.title').html(data.Data.Item.NoticeMain.NoticeTitle);
			$('.title').attr('tilte', data.Data.Item.NoticeMain.NoticeTitle);
			$('.content').html(data.Data.Item.NoticeMain.NoticeContent);
			$('.notice').show();
			$('.empty').hide();
			$('video').css('max-width', '100%');
			// $('video').attr('preload', 'meta');
			$('video').attr('preload','auto');
			// $('video').attr('id', 'video');
			// $('video').attr('poster',$('video').attr('src') + '?vframe/jpg/offset/1');
			
			// $('.content').append($('<div id="output"></div>  '));
			// if ($('.musicPlayer') && $('.musicPlayer').length > 0) {
			// 	$('.musicPlayer').children('#musics').attr('width', 0);
			// 	for (var i = 0; i < $('.musicPlayer').length; i++) {
			// 		var id = "audio" + i;
			// 		var srcArr = $('.musicPlayer').eq(i).children('#musics').attr('src').split('&');
			// 		var src = '';
			// 		srcArr.map(function (item) {
			// 			if (item.indexOf('file=') > -1) {
			// 				src = item.split('=')[1];
			// 			}
			// 		})
			// 		var txt2 = $('<audio id=' + id + '  controls="controls" loop="loop" type="audio/mp3"  src=' +
			// 			src + '  type="audio/mp3" /></audio> ');
			// 		$('.musicPlayer').eq(i).prepend(txt2);
			// 		// audioAutoPlay(id);
			// 	}
				
			// }
			// var video, output;
            // var scale = 0.8;
            // var initialize = function() {
            //     output = document.getElementById("output");
            //     video = document.getElementById("video");
            //     video.addEventListener('loadeddata', captureImage);
            // };
            // var captureImage = function() {
			// 	var canvas = document.createElement("canvas");
			// 	output.appendChild(canvas);
            //     canvas.width = video.videoWidth * scale;
            //     canvas.height = video.videoHeight * scale;
            //     canvas.getContext('2d').drawImage(video, 0, 0, canvas.width,
            //             canvas.height);
			// 	console.log(canvas)
			// 	var img = document.createElement("img");
			// 	img.width = 400;
            //     img.height = 300;
            //     img.src = canvas.toDataURL("image/png");
               
            //     // output.appendChild(img);
            // };
            // initialize();
       
	//视频：
	// video = document.getElementById("video");
	// // video.play();
	// 	setTimeout(function(){
	// 		video.pause();
	// 		$('video').attr('poster','');
	// 	},1000)
    // let videos = document.querySelectorAll('video');
    // videos.forEach((video) => {
		
    //     setMedia(video);
    // });
			// var video, output;
			// 	var scale = 0.8;
			// setTimeout(function(){
			// 	var initialize = function () {
			// 		output = document.getElementById("output");
			// 		video = document.getElementById("video");
			// 		video.addEventListener('loadeddata', captureImage);
			// 	};

			// 	var captureImage = function () {
			// 		var canvas = document.createElement("canvas");
			// 		canvas.width = video.videoWidth * scale;
			// 		canvas.height = video.videoHeight * scale;
			// 		canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);

			// 		var img = document.createElement("img");
			// 		img.src = canvas.toDataURL("image/png");
			// 		output.appendChild(img);
			// 	};

			// 	initialize();
			// },100)
		


		} else {
			$('.notice').hide();
			$('.empty').show();
		}
	// 	$('html').click(function(){
	// 	// alert('发送了~');
	// 	$('.content').append('<button>点击了~</button>');
	// 	window.webkit.messageHandlers.openvc.postMessage({name:'aa', sex:'male', age:21})
	// })
	$('img').click(function(){
		
			var imgUrl =$(this).attr('src');
			var imgUrlAll='';
			for(var i=0;i<$('img').length;i++){
				imgUrlAll+=$('img').eq(i).attr('src')+',';
			}
			imgUrlAll=imgUrlAll.slice(0,-1);
			// $('.content').append('<button>点击了~</button>');
			window.webkit.messageHandlers.openvc.postMessage({"imgUrl":imgUrl,"imgUrlAll":imgUrlAll});
		})
	}, function (error) {
		$('.notice').hide();
		$('.empty').show();

	});
</script>

</html>